answer "Careful! This will reset all program globals" with "Go Ahead" or "Cancel"
if it is "Cancel" then exit mouseUp
global minorgradetoscore,examgradetoscore,papergradetoscore,finalgradetoscore
global dropminors,dropexams,droppapers
global minorweight,examweight,paperweight,finalweight
global MMax,EMax,PMax,FMax
global mAplus,mA,mAminus,mBplus,mB,mBminus,mCplus,mC,mCminus
global mDplus,mD,mDminus
global eAplus,eA,eAminus,eBplus,eB,eBminus,eCplus,eC,eCminus
global eDplus,eD,eDminus
global pAplus,pA,pAminus,pBplus,pB,pBminus,pCplus,pC,pCminus
global pDplus,pD,pDminus
global fAplus,fA,fAminus,fBplus,fB,fBminus,fCplus,fC,fCminus
global fDplus,fD,fDminus
put false into minorgradetoscore
put false into examgradetoscore
put false into papergradetoscore
put false into finalgradetoscore
put 0 into dropminors
put 0 into dropexams
put 0 into droppapers
put 25 into minorweight
put 25 into examweight
put 25 into paperweight
put 25 into finalweight
global theLastName,theFirstName,theSSnumber,theCode, theMinorScores,theMinorGrades,theMinorAverages, theExamScores,theExamGrades,theExamAverages, thePaperScores,thePaperGrades,thePaperAverages, theFinalScore,theFinalGrade,theTermScore,theTermGrade
put false into theLastName
put false into theFirstName
put false into theSSnumber
put false into theCode
put false into theMinorScores
put false into theMinorGrades
put false into theMinorAverages
put false into theExamScores
put false into theExamGrades
put false into theExamAverages
put false into thePaperScores
put false into thePaperGrades
put false into thePaperAverages
put false into theFinalScore
put false into theFinalGrade
put false into theTermScore
put false into theTermGrade
end mouseUp
-- part 2 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=13 top=79 right=101 bottom=135
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: New Gradebook
----- HyperTalk script -----
on mouseUp
answer "Careful! This will delete all data and settings." with "Do It" or "Cancel"
if it is "Cancel" then exit mouseup
show card field "message"
push card
set the lockscreen to true
trimToTwo
ClearThem
pop card
send "mouseup" to card button "Initialize Globals"
push card
fixSettings
pop card
set the lockscreen to false
hide card field "message"
doMenu "Compact Stack"
beep 3
end mouseUp
on trimToTwo
global cardOffset
put cardOffset+2 into theLimit
go card theLimit+1
get the number of this card
put false into done
repeat until done
get the number of this card
if it > theLimit then
doMenu "Delete card"
play harpsichord c
else
put true into done
exit trimToTwo
end if
end repeat
end trimToTwo
on ClearThem
go card "first record"
repeat with count = 3 to 66
put empty into field count
end repeat
go next
repeat with count = 3 to 66
put empty into field count
end repeat
end ClearThem
on fixSettings
go card "Options"
set the hilite of card button 1 to false
set the hilite of card button 2 to false
set the hilite of card button 3 to true
set the hilite of card button 4 to false
set the hilite of card button 5 to true
set the hilite of card button 6 to true
set the hilite of card button 7 to false
set the hilite of card button 8 to true
repeat with count = 1 to 4
put 25 into card field count
end repeat
repeat with count = 5 to 7
put 0 into card field count
end repeat
send "mouseup" to card button 9
send "mouseup" to card button 10
go card "Preferences"
repeat with count = 1 to 52
put empty into card field count
end repeat
repeat with count = 3 to 6
send "mouseup" to card button count
end repeat
go card "Report Preferences"
send "mouseup" to card button "Clear All Choices"
go card "Global Stash"
send "mouseUp" to bkgnd button "Store Globals"
go card "grade distributions"
put empty into card field "distribution"
go card "averages"
repeat with count = 1 to 10
put empty into card field count
end repeat
go card "rows & columns"
put empty into card field 1
put empty into card field 2
go card "Student Directory"
put empty into card field "directory"
end fixSettings
-- part 3 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=13 top=135 right=157 bottom=160
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Initial # of Records
----- HyperTalk script -----
on mouseUp
Ask "How many record cards to start with?" with 1
if it is empty then exit mouseup
put it into initialcard
set the lockscreen to true
push card
go card "first record"
get the number of this card
put it into firstcardnum
get the number of last card
put it into lastcardnum
if lastcardnum <> firstcardnum then
put false into done
repeat until done
go next card
get the number of this card
if it = lastcardnum then put true into done
domenu "Delete Card"
go card "first record"
end repeat
end if
go card "first record"
repeat with count = 2 to initialcard
domenu "New Card"
end repeat
pop card
set the lockscreen to false
end mouseUp
-- part 4 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=17 top=214 right=236 bottom=215
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Compute Minor Assg. Grades
----- HyperTalk script -----
on mouseUp
global cardoffset,pushButton
put "minor assg. grade" into pushButton
computeAverage
end mouseUp
on computeAverage
global cardOffset,pushButton
show card field "message"
set the lockscreen to true
push card
go card "first record"
get the number of this card
put it into start
get the number of last card
put it into finish
pop card
repeat with count = start to finish
--set the lockscreen to false
--put count-cardOffset into line 6 of card field "message"
--set the lockscreen to true
push card
go card count
if field "withdrew" is empty then
send "mouseup" to bkgnd button pushButton
beep
end if
pop card
end repeat
--pop card
put empty into line 5 of card field "message"
hide card field "message"
set the lockscreen to false
beep
end computeAverage
-- part 5 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=17 top=240 right=262 bottom=215
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Compute Exam Grades
----- HyperTalk script -----
on mouseUp
global cardoffset,pushButton
put "exam grade" into pushButton
computeAverage
end mouseUp
--on mouseUp
show card field "message"
set the lockscreen to true
push card
go card "first record"
get the number of this card
put it into start
get the number of last card
put it into finish
repeat with count = start to finish
go card count
send "mouseup" to bkgnd button "exam grade"
end repeat
pop card
set the lockscreen to false
hide card field "message"
beep
--end mouseUp
-- part 6 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=17 top=266 right=288 bottom=216
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Compute Paper Grades
----- HyperTalk script -----
on mouseUp
global cardoffset,pushButton
put "paper grade" into pushButton
computeAverage
end mouseUp
--on mouseUp
show card field "message"
set the lockscreen to true
push card
go card "first record"
get the number of this card
put it into start
get the number of last card
put it into finish
repeat with count = start to finish
go card count
send "mouseup" to bkgnd button "paper grade"
end repeat
pop card
set the lockscreen to false
hide card field "message"
beep
--end mouseUp
-- part 7 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=18 top=292 right=314 bottom=215
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Compute Final Exam Grades
----- HyperTalk script -----
on mouseUp
global cardoffset,pushButton
put "final exam grade" into pushButton
computeAverage
end mouseUp
--on mouseUp
show card field "message"
set the lockscreen to true
push card
go card "first record"
get the number of this card
put it into start
get the number of last card
put it into finish
repeat with count = start to finish
go card count
send "mouseup" to bkgnd button "final exam grade"
end repeat
pop card
set the lockscreen to false
hide card field "message"
beep
--end mouseUp
-- part 8 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=221 top=214 right=236 bottom=374
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Compute Term Grades
----- HyperTalk script -----
on mouseUp
global cardoffset,pushButton
put "Term. grade" into pushButton
computeAverage
end mouseUp
--on mouseUp
show card field "message"
set the lockscreen to true
push card
go card "first record"
get the number of this card
put it into start
get the number of last card
put it into finish
repeat with count = start to finish
go card count
send "mouseup" to bkgnd button "Term. grade"
end repeat
pop card
set the lockscreen to false
hide card field "message"
beep
--end mouseUp
-- part 9 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=222 top=240 right=262 bottom=374
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Compute All Grades
----- HyperTalk script -----
on mouseUp
answer "That will take several minutes." with "Cancel" or "Go Ahead"
if it is "Cancel" then exit mouseup
show card field "long message"
send "mouseup" to card button "Compute Minor Assg. Grades"
send "mouseup" to card button "Compute Exam Grades"
send "mouseup" to card button "Compute Paper Grades"
send "mouseup" to card button "Compute Final Exam Grades"
send "mouseup" to card button "Compute Term Grades"
hide card field "long message"
beep
beep
beep
end mouseUp
-- part 10 (button)
-- low flags: 00
-- high flags: A004
-- rect: left=223 top=292 right=314 bottom=379
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Clear All Record Cards
----- HyperTalk script -----
on mouseUp
show card field "message"
set the lockscreen to true
push card
go card "first record"
get the number of this card
put it into start
get the number of last card
put it into finish
repeat with count = start to finish
go card count
repeat with fieldcount = 3 to 60
put empty into field fieldcount
end repeat
end repeat
pop card
set the lockscreen to false
hide card field "message"
beep
end mouseUp
-- part 11 (button)
-- low flags: 00
-- high flags: A004
-- rect: left=224 top=265 right=287 bottom=342
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Trim Gradebook
----- HyperTalk script -----
on mouseUp
ask "Trim how many cards from end of stack?"
put it into trimnumber
set the lockscreen to true
push card
go card "first record"
get the number of this card
put it into start
get the number of last card
put it into finish
put start-1 into limit
put finish-limit into cardmany
--if trimnumber > cardmany-1 then
if trimnumber > cardmany then
beep
--answer "Can't trim all record cards." with "OK"
answer "Can't trim to less than 2 record cards." with "OK"
pop card
set the lockscreen to false
exit mouseup
end if
pop card
set the lockscreen to false
show card field "message"
set the lockscreen to true
push card
go card "first record"
repeat with count = 1 to trimnumber
go last card
doMenu "Delete Card"
end repeat
pop card
set the lockscreen to false
hide card field "message"
beep
end mouseUp
-- part 12 (field)
-- low flags: 81
-- high flags: 0004
-- rect: left=294 top=82 right=170 bottom=494
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 9
-- style flags: 256
-- line height: 12
-- part name: message
-- part 14 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=169 top=173 right=192 bottom=370
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: *** HELP! ***
----- HyperTalk script -----
on mouseUp
set the visible of card field "Info 1" to not the visible of card field "Info 1"
end mouseUp
-- part 15 (button)
-- low flags: 00
-- high flags: A002
-- rect: left=15 top=23 right=40 bottom=66
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: Options
----- HyperTalk script -----
on mouseUp
visual effect dissolve
go card "Options"
end mouseUp
-- part 16 (button)
-- low flags: 00
-- high flags: A002
-- rect: left=73 top=23 right=40 bottom=142
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: Preferences
----- HyperTalk script -----
on mouseUp
visual effect dissolve
go card "Preferences"
end mouseUp
-- part 17 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=424 top=22 right=45 bottom=495
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 9
-- style flags: 256
-- line height: 12
-- part name: to Records
----- HyperTalk script -----
on mouseUp
visual effect dissolve
go card "first record"
end mouseUp
-- part 21 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=385 top=215 right=237 bottom=485
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: print records
----- HyperTalk script -----
on mouseUp
answer "Include those who dropped?" with "yes" or "no" or "cancel"
if it is "yes" then
put true into dodrops
else if it is "no" then
put false into dodrops
else
exit mouseup
end if
go card "first record"
get the number of this card
put it into start
get the number of last card
put it into finish
if dodrops then
repeat with count = start to finish
go card count
domenu "Print Card"
end repeat
else
repeat with count = start to finish
go card count
if bkgnd field "withdrew" is empty then domenu "Print Card"
end repeat
end if
end mouseUp
-- part 22 (field)
-- low flags: 81
-- high flags: 0004
-- rect: left=170 top=117 right=202 bottom=370
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 9
-- style flags: 256
-- line height: 12
-- part name: long message
-- part 28 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=365 top=265 right=288 bottom=496
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: set default codes
----- HyperTalk script -----
on mouseUp
show card field "message"
set the lockscreen to true
push card
go card "first record"
get the number of this card
put it into start
get the number of last card
put it into finish
repeat with count = start to finish
go card count
send "mouseup" to bkgnd button "default"
play harpsichord c
end repeat
pop card
hide card field "message"
set the lockscreen to false
end mouseUp
-- part 25 (field)
-- low flags: 81
-- high flags: 2007
-- rect: left=221 top=55 right=320 bottom=495
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: Info 1
----- HyperTalk script -----
on mouseUp
set the scroll of me to 0
hide card field "Info 1"
end mouseUp
-- part contents for card part 12
----- text -----
Please be patient...
This may take a while.
-- part contents for card part 22
----- text -----
Go find something to do...
This is probably going to
take quite a while.
I'll beep for you when
I'm done.
-- part contents for card part 25
----- text -----
This card is set up to carry out a variety of managerial chores. Buttons above the dividing line are mainly directed to setting up a NEW gradebook. Buttons below the dividing line carry out operations connected with a current, ongoing gradebook. The buttons at the very top are "navigators" that will take you to other places in the Stack.
---------------------------------------------
NEW GRADEBOOK sets up the current Gradebook stack as a new gradebook. DO NOT USE IT on a gradebook that is still active, since it deletes all data and all settings. NEW GRADEBOOK does the following things:
(1) Deletes all but two Student Record cards; (2) Clears all data from those two cards; (3) Resets all Option and Preference settings in the Stack to their default values. If the current Gradebook stack is a fresh copy of the Clean Original Gradebook all of those things have already been don: you don't need to do them again .
INITIALIZE GLOBALS set the major program global variables to their default values, without making any other changes. If the current Gradebook stack is a fresh copy of the Clean Original Gradebook, its globals are already set to their default values.
INITIAL # OF RECORDS should be used immediately after NEW GRADEBOOK, or when setting up a fresh copy of the Clean Original Gradebook. It lets you set up your Gradebook with the number of cards you want initially. Later, you can add or delete more cards individually, with buttons in the Student Records area.
---------------------------------------------
COMPUTE...GRADES buttons go through and compute the indicated grades, for all active students. They provide an alternative to clicking buttons on individual Student Record cards.
TRIM GRADEBOOK lets you trim a specified number of Student Record cards from the end of the gradebook.
CLEAR RECORDS leaves the same number of Student Record cards, but clears all data out of them.
PRINT RECORDS prints out the Student Record section of the Stack.
SET DEFAULT CODES sets all individual student codes to their default value--the last four digits of the social security number.